package com.example.springboot1012.mysqlclass;

import com.example.springboot1012.mysqlclass.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserMapper {
    @Select("select * from user_table order by id desc")
    List<User> getUserList();

    @Insert("insert into user_table(user_name,user_age) values(#{user_name},#{user_age})")
    int AddUser(User user);
}
